package com.ruoyi.hxf.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 帖子创建管理对象 f_topic
 *
 * @author hxf
 * @date 2023-1-18
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("f_topic")
public class Topic extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 帖子id
     */
    @TableId(value = "topic_id")
    private Long topicId;

    /**
     * 帖子标题
     */
    @NotBlank(message = "帖子标题不能为空")
    @Size(min = 0, max = 20, message = "帖子名称不能超过20个字", groups = {AddGroup.class, EditGroup.class})
    private String topicTitle;

    /**
     * 帖子内容
     */
    @NotBlank(message = "帖子标题不能为空", groups = {AddGroup.class, EditGroup.class})
    @Size(min = 0, max = 400, message = "帖子内容不能超过400个字")
    private String topicContent;

    /**
     * 帖子点赞数
     */
    private Integer topicLikes;

    /**
     * 帖子评论数量
     */
    private Integer topicCount;

    /**
     * 帖子视频地址
     */
    private String topicVideo;


    /**
     * 帖子图片地址
     */
    private String topicImgList;


    /**
     * 状态(0审核中，1审核通过)
     */
    private String topicStatus;


    /**
     * 是否删除(0不显示，1显示)
     */
    private String isDelete;

    /**
     * 备注
     */
    private String remark;

    @TableField(exist = false)
    private SysUser sysUser;

    @TableField(exist = false)
    private String TopicCollection;

    private Integer readCount;

    @TableField(exist = false)
    private String type;
}
